package com.feng.fengDUtil.dao.dialet;

public class OracleDialet implements Dialet {
    public OracleDialet() {
    }

    public String pageSql(String sql, int pageNo, int pageSize) {
        StringBuilder sb = new StringBuilder(512);
        long index = (long)(pageNo * pageSize);
        sb.append("select * from (select *  from (select t_.*, row_number() OVER(ORDER BY null) AS \"row_number\"  from (").append(sql).append(") t_) p_ where p_.\"row_number\" > ").append(index).append(") q_ where rownum <= ").append(pageSize);
        return sb.toString();
    }
}
